package DAO.AccountDao;

import DAO.Goods;
import DAO.GoodsDaoImpl;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Scanner;

public class Tset {
    public static void main(String[] args) throws SQLException, ClassNotFoundException {
        Scanner sr=new Scanner(System.in);
        /*
        Accounts_Database account=new Accounts_Database();
        String username,userpassword;
        System.out.println("请输入账户名：");
        username=sr.nextLine();
        account.setUserName(username);
        System.out.println("请输入密码");
        userpassword=sr.nextLine();
        account.setUserPassword(userpassword);
        //account.checkAccout();//从数据库中查找验证账号密码
        account.CreatAccount();//在数据库中插入账号密码
        */

        InetAddress addr = null;
        try {
            addr = InetAddress.getLocalHost();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        System.out.println("Local HostAddress: "+addr.getHostAddress());
                String hostname = addr.getHostName();
        System.out.println("Local host name: "+hostname);


      //  Goods_Databases goods_databases=new Goods_Databases();
        //输出所有账户信息测试
/* GoodsDaoImpl goodsDao= new GoodsDaoImpl();
        ArrayList<Goods> list=new ArrayList<Goods>();
        list=goodsDao.findAll();
        int num=0;
        for(Goods g:list)
        {
            System.out.println(g);
        }*/

     }
}
